package autotd;

import java.awt.Point;

public class Tower extends Unit{
	private static int currid = 1;

	public final TowerType Type;
	public final int height;
	
	public Tower(TowerType type, int height) {
		super(type.Delay);
		this.height = height;
		Type = type;
		id = currid;
		currid++;
	}


	public boolean inRange(Point p1) {
		return GameMap.inRange(p1, pos, Type.Range);
	}


	public String toString() {
		return id + " " + Type.Name + " " + height + " " + timer;
	}
}